Skip to content

Document useful module-level constants - #2884

Open
anshurajbisoyi98-ctrl wants to merge 1 commit into
pvlib:mainfrom
anshurajbisoyi98-ctrl:docs-2096-document-constants
Open

anshurajbisoyi98-ctrl wants to merge 1 commit into
pvlib:mainfrom
anshurajbisoyi98-ctrl:docs-2096-document-constants

Conversation

@anshurajbisoyi98-ctrl

@anshurajbisoyi98-ctrl anshurajbisoyi98-ctrl commented Oct 4, 2026 •

Copy link
Copy Markdown
  • Closes Document internal module-level constants #2096
  • I am familiar with the contributing guidelines
  • I attest that all AI-generated material has been vetted for accuracy and is in compliance with the pvlib license
  • Tests added
  • Updates entries in docs/sphinx/source/reference for API changes.
  • Adds description and name entries in the appropriate "what's new" file in docs/sphinx/source/whatsnew for all changes. Includes link to the GitHub Issue with :issue:`num` or this Pull Request with :pull:`num`. Includes contributor name and/or GitHub username (link with :ghuser:`user`).
  • New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
  • Pull request is nearly complete and ready for detailed review.
  • Maintainer: Appropriate GitHub Labels (including remote-data) and Milestone are assigned to the Pull Request and linked Issue.

This change creates a dedicated constants page because useful module-level lookup tables and model-name collections were difficult to discover in the source and were not consistently linked from the API reference. It documents the albedo tables, airmass model collections, Hellmann wind exponents, and temperature model parameters in one place, while retaining the temperature reference as a direct link to that shared page. The corresponding constants now have concise module-level docstrings.

Validation

  • make -C docs/sphinx clean && make -C docs/sphinx html SPHINXOPTS='-W --keep-going -n': completed with 2,014 existing nitpicky warnings from legacy documentation; no warnings referenced the changed constants page or changed source claims. The command reports build finished with problems because strict mode treats warnings as errors.
  • make -C docs/sphinx html: passed; build succeeded.
  • make -C docs/sphinx linkcheck SPHINXOPTS='-W --keep-going -n': stopped after 120 seconds because the external link check was still running; partial output contained 2,010 warnings, primarily legacy nitpicky references. No changed-file link failure was observed.
  • git diff --check: passed.
  • flake8 pvlib/albedo.py pvlib/atmosphere.py: passed.
  • pytest -q tests/test_albedo.py tests/test_atmosphere.py tests/test_temperature.py: passed, 64 tests.
  • Built docs/sphinx/build/html/reference/constants.html contains all eight requested constants: SURFACE_ALBEDOS, WATER_COLOR_COEFFS, WATER_ROUGHNESS_COEFFS, APPARENT_ZENITH_MODELS, TRUE_ZENITH_MODELS, AIRMASS_MODELS, HELLMANN_SURFACE_EXPONENTS, and TEMPERATURE_MODEL_PARAMETERS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document internal module-level constants

1 participant